From: mlitn Date: Tue, 3 Jul 2012 17:33:42 +0000 (-0700) Subject: Fix FakeResultWrapper::fetchRow, which (contrary to ResultWrapper::fetchRow) didn... X-Git-Tag: 1.31.0-rc.0~23161 X-Git-Url: http://git.cyclocoop.org/%7D%7Cconcat%7B?a=commitdiff_plain;h=f4b9c8734e39e69f3db1c6f658fc13e7db7d747a;p=lhc%2Fweb%2Fwiklou.git Fix FakeResultWrapper::fetchRow, which (contrary to ResultWrapper::fetchRow) didn't always return an array This was originally part of https://gerrit.wikimedia.org/r/13880 Change-Id: I0b737bafa59c97ff0b658189c53022388bb7a56d --- diff --git a/includes/db/DatabaseUtility.php b/includes/db/DatabaseUtility.php index eacebcfc69..c846788d75 100644 --- a/includes/db/DatabaseUtility.php +++ b/includes/db/DatabaseUtility.php @@ -242,7 +242,11 @@ class FakeResultWrapper extends ResultWrapper { $this->currentRow = false; } $this->pos++; - return $this->currentRow; + if ( is_object( $this->currentRow ) ) { + return get_object_vars( $this->currentRow ); + } else { + return $this->currentRow; + } } function seek( $row ) {